package edu.sctu.renpingan.imitatesubwaysystem;

/**
 * Created by user18 on 2015/5/31.
 */
public class SubwayCard {
    /***
     * 姓名
     * 余额
     */

    public int balance;


    //判断余额
    public Boolean judgeBalance(int balance, int consume ){
        boolean s = true;
        if(consume > balance){
            s = false;
        }
        return s;
    }

    //返回余额
    public int getBalance(int balance,int consume){
        this.balance = balance - consume;
        return this.balance;
    }


    //充值
    public int recharge(int balance,int money){
        balance = balance + money;
        return balance;
    }


}
